package ee.mtiidla.data;

import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;

/**
 * Created by Marko on 12.10.2014.
 */
@XmlAccessorType(XmlAccessType.FIELD)
public class Event {

	@XmlAttribute(name = "eventid")
	private long eventId;

	@XmlAttribute(name = "daytime")
	private String daytime;

	@XmlAttribute(name = "gender")
	private String gender;

	@XmlAttribute(name = "number")
	private int number;

	@XmlAttribute(name = "order")
	private int order;

	@XmlAttribute(name = "preveventid")
	private int preEventId;

	@XmlAttribute(name = "round")
	private String round;

	@XmlElement(name = "SWIMSTYLE")
	private Swimstyle swimstyle;

	@XmlElement(name = "FEE")
	private Fee fee;

	@XmlElementWrapper(name = "HEATS")
	@XmlElement(name = "HEAT")
	private List<Heat> heats;

	@XmlElementWrapper(name = "AGEGROUPS")
	@XmlElement(name = "AGEGROUP")
	private List<AgeGroup> ageGroups;

	public long getEventId() {
		return eventId;
	}

	public void setEventId(long eventId) {
		this.eventId = eventId;
	}

	public String getDaytime() {
		return daytime;
	}

	public void setDaytime(String daytime) {
		this.daytime = daytime;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public int getNumber() {
		return number;
	}

	public void setNumber(int number) {
		this.number = number;
	}

	public int getOrder() {
		return order;
	}

	public void setOrder(int order) {
		this.order = order;
	}

	public int getPreEventId() {
		return preEventId;
	}

	public void setPreEventId(int preEventId) {
		this.preEventId = preEventId;
	}

	public String getRound() {
		return round;
	}

	public void setRound(String round) {
		this.round = round;
	}

	public Swimstyle getSwimstyle() {
		return swimstyle;
	}

	public void setSwimstyle(Swimstyle swimstyle) {
		this.swimstyle = swimstyle;
	}

	public Fee getFee() {
		return fee;
	}

	public void setFee(Fee fee) {
		this.fee = fee;
	}

	public List<Heat> getHeats() {
		return heats;
	}

	public void setHeats(List<Heat> heats) {
		this.heats = heats;
	}

	public List<AgeGroup> getAgeGroups() {
		return ageGroups;
	}

	public void setAgeGroups(List<AgeGroup> ageGroups) {
		this.ageGroups = ageGroups;
	}

	public String toString() {

		return String.valueOf(number) + ". " + Gender.get(gender) + ", " + swimstyle.toString();
	}
}
